//
//  ProductModel.swift
//  iWatchManager
//
//  Created by GujyHy on 2018/1/24.
//  Copyright © 2018年 GujyHy. All rights reserved.
//

import UIKit
import SwiftyJSON

class ProductModel: NSObject {
   
    
    var m_goodsId:String    = ""       // 商品ID
    var m_goodsName:String  = ""       // 商品名称
    
    var m_imgList:[ImageListModel]  = [ImageListModel]()       // 图片列表
 
    override init() {
        super.init()
    }
    // 构造
    convenience init(_ json:JSON) {
        self.init()
        
        m_goodsId = json["goodsId"].stringValue
        m_goodsName = json["goodsName"].stringValue
        let arrayNames =  json["imgList"].arrayValue
        
        for subJson:JSON in arrayNames {
            let ilist = ImageListModel.init(subJson)
            m_imgList.append(ilist)
        }

    }
}
